//
//  UserTypeMessaheViewController.m
//  HongFuShop
//
//  Created by chirui on 2017/8/22.
//  Copyright © 2017年 Shui. All rights reserved.
//

#import "UserTypeMessaheViewController.h"

@interface UserTypeMessaheViewController ()

@property (nonatomic, strong) UIWebView *webView;

@end

@implementation UserTypeMessaheViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.backgroundColor =[UIColor whiteColor];
    
    self.navigationItem.titleView = [TopLabel withLabelWithLabelText:@"用户协议"];
    
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithIcon:@"icon_public_return" target:self action:@selector(backButton)];
    
    [self creatWebWith:self.urlStr];
}
-(void)backButton{
    
    [self.navigationController popViewControllerAnimated:YES];
}

-(void)creatWebWith:(NSString *)str {
    
    _webView = [[UIWebView alloc] initWithFrame:CGRectMake(0,0,WIDTH, HEIGHT-64)];
    _webView.scalesPageToFit = YES;
    
    NSURL* url =[NSURL URLWithString:str];
    
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [_webView loadRequest:request];
    
    [self.view addSubview:self.webView];
    
}

@end
